﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WL_Store.DAL;
using WL_Store.Model;

namespace WL_Store.BLL
{
    /// <summary>
    /// 会员信息BLL
    /// </summary>
   public  class VipInfoBLL
    {
        VipInfoDAL dal = new VipInfoDAL();
        /// <summary>
        /// 查询会员信息
        /// </summary>
        /// <returns></returns>
        //public DataTable GetVipInfos()
        //{
        //    return dal.GetVipInfos();
        //}
        //public List<VipInfoModel> GetVipInfosProc(VipInfoSearchModel searchModel)
        //{
        //    return dal.GetVipInfosProc(searchModel);
        //}
        /// <summary>
        /// 查询所有信息（proc）(分页)
        /// </summary>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public List<VipInfoModel> GetVipInfosProc(VipInfoSearchModel searchModel, int PageIndex, int PageSize, out int TotalCount)
        {
            return dal.GetVipInfosProc(searchModel,PageIndex,PageIndex,out TotalCount);
        }

        /// <summary>
        /// 添加VIP用户信息 返回true：添加成功 返回false：添加失败
        /// </summary>
        /// <param name="vipInfo"></param>
        /// <returns></returns>
        public bool AddVipInfosProc(VipInfoModel vipInfo)
        {
            return dal.AddVipInfosProc(vipInfo);
        }
        /// <summary>
        /// 删除会员信息 返回true：删除成功；返回false：删除失败 
        /// </summary>
        /// <param name="commodityID"></param>
        /// <returns></returns>
        public bool DeleteVipInfosoProc(int vipId)
        {
            return dal.DeleteVipInfosoProc(vipId);
        }
        /// <summary>
        /// 根据会员Id查询会员信息
        /// </summary>
        /// <param name="vipId"></param>
        /// <returns></returns>
        public VipInfoModel VipInfo(int vipId)
        {
            return dal.VipInfo(vipId);
        }

        /// <summary>
        /// 根据vipId修改会员信息 返回true:修改成功；返回false：修改失败
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdatevipInfoProc(VipInfoModel model)
        {
            return dal.UpdatevipInfoProc(model);
        }
    }
}
